home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
bsbwh.inh
< prev
next >
Wrap
Text File
|
1993-08-23
|
3KB
|
120 lines
inst4.1
!****************************************************************
!* *
!* Brain-State-in-a-Box (Widrow-Hoff) Network Generator *
!* *
!****************************************************************
! *** check that input PE count is non-zero
?&In 1
>bge CheckOut
@Err "Brain-State-in-a-Box MUST have at least one input PE"
:CheckOut
! *** Load the Control Strategy and LRS if needed
@LdCS "hopfield" !control strategy
@LdLR "bsbwh" !L/R schedule
=netn "InstaNet (tm) BSB Widrow-Hoff Network version 4.10 Sept-1992"
=DLnF 0 !learn re-display off
=DRcF 0 !recall re-display off
! *** Build the Input Layer ***
@LLdf !load default layer to mi_layer structure
=LDln "In" !layer name
=Lpes &In !copy # of input PEs from menu
=Ltrn "Signum0" !transform inputs to -1,0,+1
=x 100 !place to put layer on screen
=y 60
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd !add the input layer
=n0 LayN !track previous layer
! *** Build the Hopfield Layer ***
@LLdf !start with default layer again
=LDln "The Brain" !layer name
=Lpes &In !desired number of PEs
=Llrn "BSB:Widrow-Hoff" !learning rule
=Ltrn "BSB" !transfer function
=Llow -1.3 !low limit for outputs
=Lhgh 1.3 !high limit for outputs
+y 170 !up higher on display
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd
! *** Connect it to the input layer ***
=SPEl LayN !current layer
@SlPE
=NPEl n0 !input layer
@NrPE
=cnwt 1.0 !unit weight
=cnsc WRel
=cnty WSet
@LCCr !connect corresponding items
! *** Connect it to itself ***
=NPEl LayN
@NrPE
=cnwt 0.0 !zero weights
=cnty WVar !trainable
=cnsc WAbs
=cndn 50.0 !50 % interconnection
@LCRn !Randomly connect (except diagonal)
=n0 LayN !track previous layer
! *** Feed PEs back to themselves in this layer ***
=cnwt 1.0 !unit weight modulated by mod factor
=cnty WMod
@LCCr
! *** Build the Output Layer ***
@LLdf !start with default layer again
=LDln "Output" !layer name
=Lpes &In !desired number of PEs
+y 60 !up higher on display
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd
! *** Connect the output layer back to the hopfield layer ***
=SPEl LayN !select output layer
@SlPE
=cnwt 1.0 !unit weight
=cnty WFix !fixed
=cnsc WRel
@LCCr
! *** Select Control Strategy & L/R Schedule ***
@LLsl !load super layer
=Lctl "hopfield" !control strategy
=Llrs "bsbwh" !L/R Schedule
=Llnn "bsbwh" !name of learn input
=Lrcn "bsbwh" !name of recall output
#Incl "stdioset.iif" !standard I/O settings
+Lflg LAAs !auto-associative
=Lscl -1 !input low-value
=Loff 1 !input high-value
=Llow -1 !output low-value
=Lhgh 1 !output high-value
=Lax1 Epch !epoch size
@SVsl !save it back
!
=Grph 1
=GrLF "bsbwh" !instrument list file
!
=jogl -.1 !lower limit for jog
=jogh +.1 !upper limit for jog
=seed 257 !starting seed number
@seed !set the seed
@Nrnd !randomize the network
@EOF